<?php
namespace app\www\controller;
use x\Xbase;
use Endroid\QrCode\QrCode;
class Com extends Xbase{

    //二维码
    public function qrcode(){
        $txt = $this->get('txt');
        $txt = urldecode($txt);
        $qrCode = new QrCode($txt);
        header('Content-Type: '.$qrCode->getContentType());
        echo $qrCode->writeString();
        exit;
    }

}
